A PWM (i.e., pulse width modulation) method is a modulation method for modulating and changing a duty ratio of a pulse wave. In a microcomputer (e.g., a micro controller, a micro processor or the like), a PWM timer generates a PWM pulse wave.
The patent document No. 1 teaches technique that content of a data for setting a duty ratio is monitored by a hard ware so that an active level of the PWM signal is controlled. Thus, load of a soft ware is reduced. This technique shows that the duty ratio is defined by a value in a lower limit setting register when a value set in a compare register is smaller than the value in the lower limit setting register, and the duty ratio is defined by a value in an upper limit setting register when the value set in the compare register is larger than the value in the upper limit setting register. Thus, the duty ratio is output as a duty ratio signal. In this case, it is not necessary to monitor with using the soft ware since the duty ratio is monitored with using the hard ware.
Further, the patent document No. 2 teaches a pulse width modulator for outputting a PWM signal synchronized with a reference clock.
[Patent document No. 1] JP-A-H06-083985
[Patent document No. 2] JP-A-2003-11410
A peripheral function element (i.e., a peripheral circuit module) is mounted on a microcomputer such as a general timer including a PWM timer, a SCI (i.e., serial communication interface) and a CAN (controller area network). In the peripheral function element, it is necessary to set a certain value in a control register having the peripheral function element by writing from a central processing unit (i.e., CPU). The present inventors have studied about the above technique. The present inventors find out that a bus traffic in the CPU is overloaded so that a temporally trap of writing function in the CPU may be occurred. When the trap is occurred, the CPU cannot control the PWM sufficiently, so that a normal PWM pulse is not output. Further, it is considered that interruption of the CPU is performed to update the duty value. However, the present inventors find out that the normal PWM pulse may not be output when failure of an interruption signal caused by a soft ware error or breakdown of the hard ware occurs. This provides reduction of reliability of a system.